import pandas as pd
df = pd.DataFrame({
    '商品':['5费贡景超','5费贪吃贡景超','3费贡景超'],
    '单价（金币）':['5','5','4'],
    '销量（张）':['100','None','None'],
    '库存（张）':['50','None','70']
})
print('原始数据\n',df)
print('删除包含缺失值的行\n',df.dropna())
print('删除包含缺失值的列\n',df.dropna(axis=1))
print('删除少于三个非缺失值的行\n',df.dropna(thresh=3))
print('删除库存列包含缺失值的行\n',df.dropna(subset=['库存（张）']))

print(df.fillna(120))
print(df.fillna({'销量（张）':120,'库存（张）':60}))
print()
print()
print()

